package mybag2;

import java.util.Scanner;

//圆
public class Circular extends Geometry {
	Scanner input = new Scanner(System.in);

	public void area() {
		System.out.println("请输入圆形的半径：");
		double radius = input.nextDouble();
		System.out.println("圆的面积为：" + ((Math.PI) * radius * radius));
	}

	@Override
	public void perimeter() {
		System.out.println("请输入圆形的半径：");
		double radius = input.nextDouble();
		System.out.println("圆的周长为：" + ((Math.PI) * 2 * radius));
	}
}
